package com.youchuang.service;

import java.util.List;

import com.youchuang.action.cart.CartItem;

public interface CartService {
	
//	public Map<String, CartItem> getStore();

	public void buy(String id);

	public void update(String id, int num);

	public void delete(String id);

	public void recovery(String id);

	public void clearCart();

	/**
	 * 
	 * @param flag
	 *            是否给删除
	 * @return
	 * @throws Exception
	 */
	public double total(boolean flag);

	/**
	 * 获取购物车的商品
	 * 
	 * @param delete
	 *            商品是否刪除
	 * @return
	 * @throws Exception
	 */
	public List<CartItem> getItems(boolean delete);
}
